/************************************************************************

								Heroes IV
					  Copyright 2000, The 3DO Company

	------------------------------------------------------------------
  						 wave_sound.h

	$Header: /resource_editor/wave_sound.h $

	$NoKeywords: $

 ************************************************************************/

#if !defined( STANDARD_C_SYSTEM_FILE_H_INCLUDED )
#define STANDARD_C_SYSTEM_FILE_H_INCLUDED

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#include <stdio.h>

#include "abstract_file.h"

// -------------------------------------------------------------
// standard file class wraps standard c file functions
// -------------------------------------------------------------

class t_standard_c_file : public t_abstract_file
{
public:
	t_standard_c_file();
	virtual ~t_standard_c_file();

	virtual bool open( const char *filename, const char *mode );
	virtual bool close( );

	virtual t_int32		filesize( );
	virtual t_int32		seek( long offset, int origin );
	virtual t_uint32	read( void *buffer, t_uint32 size, t_uint32 count);
	virtual t_uint32	write( const void *buffer, t_uint32 size, t_uint32 count);
	virtual char *		get_file_handle();

private:
	FILE*				m_file_handle;
};

typedef t_counted_ptr < t_standard_c_file > t_standard_c_file_ptr;

#endif // STANDARD_C_SYSTEM_FILE_H_INCLUDED